function RealDate(start,end){
   const dayTimes = 24*60*60*1000; // 换算成毫秒级别
   const range = end.getTime() - start.getTime();
   let total = 0;
   res = [];
   while(total <= range && range > 0 ) {
       res.push(new Date(start.getTime() + total).toLocaleDateString().replace(/\//g,'-'))
       total += dayTimes
   }
   return res;
}

var start = "2019-02-04"
var end = "2019-02-07"
//console.log(new Date(start).getTime())
var arr = RealDate(new Date(start),new Date(end))
console.log(arr)